package com.itheima.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.pojo.PageResult;
import com.itheima.pojo.Student;
import com.itheima.pojo.StudentQueryParam;

import java.util.List;

public interface StudentService extends IService<Student> {
    /**
     * 条件查询 + 分页查询
     * @param studentQueryParam
     * @return
     */
    PageResult<Student> queryStudentList(StudentQueryParam studentQueryParam);

    /**
     * 新增学生
     * @param student
     * @return
     */
    Integer addStudent(Student student);

    /**
     * 根据id查询学生
     * @param id
     * @return
     */
    Student queryStudentById(Integer id);

    /**
     * 修改学生
     * @param student
     * @return
     */
    Integer updateStudent(Student student);

    /**
     * 批量删除学生
     * @param ids
     * @return
     */
    Integer deleteStudentByIds(List<Integer> ids);

    /**
     * 学生违纪扣分
     * @param id
     * @param score
     */
    void updateViolationStu(Integer id, Short score);
}
